package com.heima.model.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum UserStatusEnum {

    DISABLE_TEMP(0, "暂时不可用"),
    DISABLE_FOREVER(1, "永久不可用"),
    ENABLE(9, "正常可用");

    private Integer status;
    private String desc;

    UserStatusEnum(Integer status, String desc){
        this.desc = desc;
        this.status = status;
    }

    /**
     * 判断用户状态是否合法的
     * */
    public static boolean isValid(Integer status){
        if(Objects.equals(status,ENABLE.getStatus())){
            return true;
        }
        return false;
    }
}
